package org.jeecg.modules.demo.publicplace.controller;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.publicplace.service.IZnzfPublicOpenService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

@Slf4j
public class EmptyCurrentReservationNumberJob implements Job {
    @Autowired
    private IZnzfPublicOpenService znzfPublicOpenService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        int i = znzfPublicOpenService.emptyCurrentReservationNumber();
        if (i != 0)
            log.info("更新失败！");
        log.info("更新成功！");
    }
}
